<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    
    <h:head>
        <title>IV1201 Project - Group 08</title>
        <meta name="keywords" content="IV1201 Project work for group 08."/>
        <meta name="author" content="Mustafa Hamra, Andreas Norberg, 
                                            Christian Castillo"/>
        <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8"/>
        <link type="text/css" rel="stylesheet" href="CSS/screen.css"
                                                media="screen" />
    </h:head>
    <h:body>
        <div id="container">
            <div id="top">
                <div id="header">

                    <br/><br/><br/><br/><br/>

                    <div id="headerText">
                        IV1201<br/>
                        Group 8
                    </div>
                </div>
                <div id="menu">
                    <a href="index.xhtml">Home</a>
                    <a href="login.xhtml">Recruiter login</a>
                    <a href="apply.xhtml">Apply to job</a>
                </div>
            </div>

            <div id="body">
                <div class="post">
                    <fieldset>
                        <legend>
                            Application
                        </legend>
                        <div class="text">
                        <h:form>
                            <td>
                                <h:selectOneMenu value="#{userManager.areas}">
                                    <f:selectItem itemValue="Customer Service" itemLabel="Customer Service"/>
                                    <f:selectItem itemValue="Face-to-face seller" itemLabel="Face-to-face Seller"/>
                                    <f:selectItem itemValue="Carpenter" itemLabel="Carpenter"/>
                                    <f:selectItem itemValue="Electrician" itemLabel="Electrician"/>
                                    <f:selectItem itemValue="Technician" itemLabel="Technician"/>
                                    <f:selectItem itemValue="Chef" itemLabel="Chef"/>
                                    <f:selectItem itemValue="Engineer" itemLabel="Engineer"/>
                                    <f:selectItem itemValue="Architect" itemLabel="Architect"/>
                                    <f:selectItem itemValue="Paramedic" itemLabel="Paramedic"/>
                                </h:selectOneMenu>
                            </td>
                        
                            <h:outputText value="Years:" /> <h:inputText value ="#{userManager.years}"/>
                            <p>
                                <h:commandButton value="Add" action="#{userManager.addItem}"/>
                                <h:commandButton value="Clear all" action="#{userManager.clearItems}"/>
                            </p>   
                            <td>
                                <ui:repeat var="o" value="#{userManager.items}" varStatus="areas">             
                                    <p><b>Area:</b> #{o.area}    <b>Years:</b> #{o.year}</p> 
                                </ui:repeat>
                            </td>
                            <!-- next stage of job applicaiton -->
                            <p>
                                <h:commandButton value="Next" action="apply_period"/>
                            </p>

                        </h:form>
                        </div>
                    </fieldset> 
                </div>
            </div>

            <div id="footer">
                <div class="right">
                </div>
                <p>
                    <ui:include src="include.xhtml" />
                </p>
            </div>
        </div>
    </h:body>
</html>